package me.zhengjie.modules.customer_app.rest;

/**
 * Created by bruce on 19/10/4.
 */

import lombok.extern.slf4j.Slf4j;
import me.zhengjie.aop.log.Log;
import me.zhengjie.modules.customer.service.TCustomerInfoService;
import me.zhengjie.modules.customer.service.dto.TCustomerInfoQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("app/customer")
public class TAppSearchUtilController {

    @Autowired
    private TCustomerInfoService tCustomerInfoService;

    @Log("查询TCustomerInfo")
    @GetMapping(value = "/tCustomerInfo")
    public ResponseEntity getTCustomerInfos(TCustomerInfoQueryCriteria criteria, Pageable pageable){
        return new ResponseEntity(tCustomerInfoService.queryAll(criteria,pageable), HttpStatus.OK);
    }
}
